<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</head>

<style>
</style>

<body>
    <table>
        <thead>
            <tr>
                <th id="setting-item-name">设置项名称</th>
                <th id="setting-item-content">设置项内容</th>
                <th id="setting-item-memo">设置项备注</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td><span>Server</span></td>
                <td>
                    <input id="jupyterServerInput" type="text" placeholder="http(s)://hostname(:port)">
                    <button id="jupyterServerButton">确认</button>
                </td>
                <td>
                    <span id="memo-server">jupyter 服务</span>
                    <a id="jupyterServerTest">测试</a>
                </td>
            </tr>
            <tr>
                <td><span>Cookies</span></td>
                <td>
                    <input id="jupyterCookiesInput" type="text" placeholder="_xsrf=d|x..x|x........x|d....d">
                    <button id="jupyterCookiesButton">确认</button>
                </td>
                <td><span id="memo-cookie">认证 Cookies</span></td>
            </tr>
            <tr>
                <td><span>Token</span></td>
                <td>
                    <input id="jupyterTokenInput" type="text">
                    <button id="jupyterTokenButton">确认</button>
                </td>
                <td><span id="memo-token">认证 Token</span></td>
            </tr>
    </table>
</body>
<script type="module">
    import {
        config,
        i18n,
    } from './js/config.js';
    var url = new URL(window.location.href);
    const lang = url.searchParams.get('lang');

    document.getElementById('setting-item-name').innerText = i18n('setting-item-name', lang);
    document.getElementById('setting-item-content').innerText = i18n('setting-item-content', lang);
    document.getElementById('setting-item-memo').innerText = i18n('setting-item-memo', lang);

    document.getElementById('memo-server').innerText = i18n('memo-server', lang);
    document.getElementById('memo-cookie').innerText = i18n('memo-cookie', lang);
    document.getElementById('memo-token').innerText = i18n('memo-token', lang);

    document.getElementById('jupyterServerTest').innerText = i18n('test', lang);
    document.getElementById('jupyterServerButton').innerText = i18n('ok', lang);
    document.getElementById('jupyterCookiesButton').innerText = i18n('ok', lang);
    document.getElementById('jupyterTokenButton').innerText = i18n('ok', lang);
</script>
<script type="module" src="./js/global.js"></script>

</html>
